package games.gong.durid.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Null;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class PermissionDTO {
    @Null(message = "权限ID必须为空")
    private Long id;

    @NotBlank(message = "权限名不能为空")
    private String name;

    private String description;

    private String resource; // 资源，如"/api/users/**"

    private String action; // 操作，如"read", "write", "delete"

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}